package com.ruoyi.basedata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 区域管理对象 t_sheets
 *
 * @author gdqt
 * @date 2024-03-01
 */
@TableName("t_sheets")
public class MeterSheets implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 平台表单自增主键
     */
    @Getter
    private Long id;

    /**
     * 租户ID
     */
    @Getter
    @TableField("tenant_id")
    private String tenantId;
    /**
     * 客户名称
     */
    @Getter
    @Setter
    @TableField(value = "dept_name", exist = false)
    private String deptName;
    /**
     * 父级ID
     */
    @Getter
    @TableField("parent_id")
//    @Excel(name = "父级ID")
    private Long parentId;

    /**
     * 区域编号
     */
    @Getter
    @TableField("sheets_code")
    @Excel(name = "区域编号", sort = 2)
    private String sheetsCode;

    /**
     * 区域名称
     */
    @Getter
    @TableField("sheets_name")
    @Excel(name = "区域名称", sort = 1)
    private String sheetsName;


    /**
     * 详细地址
     */
    @Getter
    @TableField("sheets_addr")
    @Excel(name = "详细地址")
    private String sheetsAddr;

    /**
     * 区域描述
     */
    @Getter
    @TableField("details")
    @Excel(name = "区域描述")
    private String details;
    /**
     * 0是通用，1是小表，2是大表
     */
    @TableField("device_type")
    @Getter
    @Setter
    private Integer deviceType;



    /**
     * 经度
     */
    @Getter
    @TableField("lng")
    private String lng;

    /**
     * 纬度
     */
    @Getter
    @TableField("lat")
    private String lat;

    /**
     * 经纬度
     */
    @Getter
    @TableField("lng_lat_temp")
    private String lngLatTemp;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @Getter
    @TableField("del_flag")
    private Long delFlag;

    /**
     * 备注
     */
    @TableField("remark")
    @Excel(name = "备注")
    private String remark;

    @TableField("create_by")
    private String createBy;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_by")
    private String updateBy;

    @TableField("update_time")
    private Date updateTime;

    @TableField(exist = false)
    @Getter
    @Setter
    private List<MeterSheets> children;
    /**
     * 是否不展示小表区域
     */
    @TableField(exist = false)
    @Getter
    @Setter
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private Boolean notShowXbArea;
    /**
     * 该区域下设备数量
     */
    @TableField(exist = false)
    @Getter
    @Setter
    private Integer deviceCount;

    public void setId(Long id) {
        this.id = id;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public void setSheetsCode(String sheetsCode) {
        this.sheetsCode = sheetsCode;
    }

    public void setSheetsName(String sheetsName) {
        this.sheetsName = sheetsName;
    }

    public void setSheetsAddr(String sheetsAddr) {
        this.sheetsAddr = sheetsAddr;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public void setLngLatTemp(String lngLatTemp) {
        this.lngLatTemp = lngLatTemp;
    }

    public void setDelFlag(Long delFlag) {
        this.delFlag = delFlag;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("tenantId", getTenantId())
                .append("parentId", getParentId())
                .append("sheetsCode", getSheetsCode())
                .append("sheetsName", getSheetsName())
                .append("sheetsAddr", getSheetsAddr())
                .append("details", getDetails())
                .append("lng", getLng())
                .append("lat", getLat())
                .append("lngLatTemp", getLngLatTemp())
                .append("delFlag", getDelFlag())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
